﻿using System;
using System.Linq;
using System.Linq.Expressions;

namespace Database.infrastructure
{
    public interface IRepositoryBase<T> where T : class
    {
        void Add(T entity);

        void Update(T entity);

        IQueryable<T> GetAll();

        IQueryable<T> GetAll(Expression<Func<T, bool>> where);

        void Remove(T entity);

        void Remove(Expression<Func<T, bool>> where);

        void Save(object id, T entity);
    }
}